package com.pai4j.pgc.service.message.builder;

import com.chat4j.common.constants.MessageConstants;
import com.chat4j.domain.dto.message.FocusMessageDTO;

import java.util.Date;

/**
 * @Author 程序员七七
 * @webSite https://www.coderutil.com
 * @Date 2022/11/13 00:24
 * @description
 */
public class FocusMessageBuilder extends AbstractMessageBuilder {

    @Override
    protected String getMessageCategory() {
        return MessageConstants.CategoryEnum.FOCUS.getCategory();
    }

    public FocusMessageDTO build(MessageConstants.TypeEnum type,
                                 String fromUserId,
                                 String toUserId) {
        FocusMessageDTO message = new FocusMessageDTO();
        message.setCategory(getMessageCategory());
        message.setType(type.getType());
        message.setFromUserId(fromUserId);
        message.setToUserId(toUserId);
        message.setCreateDate(new Date());
        return message;
    }
}
